package lab02.test13;

class Gymnastics extends ComputerAverage {


           @Override

 double average2() {




              for (j = 1; j <= n; j++) {

                     max = a[1] > a[j] ? a[1] : a[j];

                       min = a[1] < a[j] ? a[1] : a[j];

                       sum = sum + a[j];

                    }

               sum = sum - max - min;


                       return sum / (n - 2);

         }



          @Override

   double average1() {

              System.out.println("选手的平均分为:" + this.average2());

               return 0;

          }

}
